package com.wangjinhai.provider;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2018/8/14.
 * @Modified By:
 */
@Configuration
public class RestTemplateConfiguration {

    @Bean
    @LoadBalanced//开启负载均衡
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
